package com.zy.reflect.oop;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/12/20 14:53
 **/
@MyAnnotatin("value=atwyl")
public class Person extends Creature<String> implements Comparable,MyInterface {
    @MyAnnotatin("value=namexxx")
    public String name;
    private int age;

    public Person() {
        System.out.println("无参构造。。。。。。。。");
    }

    public Person(String name) {
        this.name = name;
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    @Override
    public String toString() {
        return "Person [name=" + name + ", age=" + age + "]";
    }
    @MyAnnotatin("value=abcdefg")
    public  void show(){
        String str="SHOW: [name=" + name + ", age=" + age + "]";
        System.out.println(str);
    }

    public  void display(String nation) throws Exception{
        System.out.println("My Address is "+nation);
    }

    @Override
    public int compareTo(Object o) {
        return 0;
    }

    private void myPrivate(){
        System.out.println("person私有方法");
    }
    //内部类
    class Bird{
    }

}